import type { PageQry, PageVO } from '@/typings'
import { http } from '@/utils/http'
import { AppMessageVO } from '@/service/message/type'

export const getPageMessage = async (page: PageQry) => {
  return http<PageVO<AppMessageVO>>({
    url: '/vrs/message',
    method: 'GET',
    query: page,
  })
}
export const getCountUnread = async () => {
  return http({
    url: '/vrs/message/count/unread',
    method: 'GET',
  })
}

export const postReadCurrentAll = async () => {
  return http({
    url: '/vrs/message/read/current/all',
    method: 'POST',
  })
}
